package com.kingcore.commerce.admin.mapper;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Repository;

import com.kingcore.commerce.admin.bean.ChapterBean;
import com.kingcore.commerce.base.mapper.CommerceMapper;

@Repository
public interface ChapterMapper extends CommerceMapper<ChapterBean, Integer> {

	List<ChapterBean> findByBook(Integer bookId);

	// 查询
	List<ChapterBean> findPageBreakByCondition(
			@Param("keywords") String keywords,
			@Param("bookId") Integer bookId,
			@Param("startInsertDate") Date startInsertDate,
			@Param("endInsertDate") Date endInsertDate, RowBounds rb);

	Integer findNumberByCondition(@Param("keywords") String keywords,
			@Param("bookId") Integer bookId,
			@Param("startInsertDate") Date startInsertDate,
			@Param("endInsertDate") Date endInsertDate);
	
	List<ChapterBean> findNotInitContent();
	
}
